//
//  ViewController.m
//  UIbutton封装
//
//  Created by adiljan on 16/4/15.
//  Copyright © 2016年 adiljan. All rights reserved.
//

#import "ViewController.h"
#import "ADButton.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    ADButton *btn = [ADButton buttonWithType:UIButtonTypeCustom frame:CGRectMake(100, 100, 100, 100) title:@"GAME" image:[UIImage imageNamed:@"icon_like_y@3x"] handler:^(UIButton *sender) {
        // 点击事件 Block
        NSLog(@"%@",sender);
    }];
    btn.backgroundColor = [UIColor yellowColor];

    [self.view addSubview:btn];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
